<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<%@ include file="/view/common/header.jsp"%> 
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>商品类别管理</title>
		<script type="text/javascript">
		
			//查询
			function search(){
				$('#dg').datagrid('load',{
					    categoryid:   $("#categoryid").val() ,
					    parentId:   $("#parentId").val() ,
					    title:   $("#title").val() ,
					    addedTime:   $("#addedTime").val() ,
					    level:   $("#level").val() ,
				});
			}
		</script>
	</head>
<body style="margin:1px;">
	<!-- 工具栏  -->
	<div id="tb">
		<div>
			<a href="javascript:openAddDialog('添加商品类别 ' ,'../category/save.do')" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
			<a href="javascript:openModifyDialog('编辑商品类别 ' ,'../category/save.do')" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
			<a href="javascript:deleteById('../category/delete.do')" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
		</div>
		<div>
							<%--&nbsp;ID：&nbsp;<input type="text" id="categoryid" size="20"  class="easyui-textbox" />&nbsp;--%>
						
							&nbsp;父ID：&nbsp;<input type="text" id="parentId" size="20"  class="easyui-textbox" />&nbsp;
						
							&nbsp;分类名：&nbsp;<input type="text" id="title" size="20"  class="easyui-textbox" />&nbsp;
						
							<%--&nbsp;新增时间：&nbsp;<input type="text" id="addedTime" size="20"  class="easyui-textbox" />&nbsp;--%>
						<%----%>
							<%--&nbsp;级别：&nbsp;<input type="text" id="level" size="20"  class="easyui-textbox" />&nbsp;--%>
						
			<a href="javascript:search()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
		</div>
	</div>
	
	<!-- 查询表单 --> 
	<table id="dg" title="商品类别管理" class="easyui-datagrid"  pagination="true" rownumbers="true"  fit="true"  url="../category/queryForPage.do"  toolbar="#tb">
		 <thead>
				<tr>
							<th data-options="field:'categoryid',width:100" align="center">ID</th>
							<th data-options="field:'parentId',width:100" align="center">父ID</th>
							<th data-options="field:'title',width:100" align="center">分类名</th>
							<%--<th data-options="field:'addedTime',width:100" align="center">新增时间</th>--%>
							<%--<th data-options="field:'level',width:100" align="center">级别</th>--%>
					
				</tr>
		</thead>
	</table>
	
	
	<!-- 弹出对话框 -->
	<div id="dlg" class="easyui-dialog" style="width: 700px;height:320px;padding: 10px 20px" closed="true" buttons="#dlg-buttons">
		<form id="fm" method="post" novalidate>
		
						 <%--<div class="fitem">--%>
			                <%--<label>ID:</label>--%>
			                <input name="categoryid" type="hidden"  >
	           			 <%--</div>--%>
						 <div class="fitem">
			                <label>父ID:</label>
			                <input name="parentId" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
						 <div class="fitem">
			                <label>分类名:</label>
			                <input name="title" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
						 <%--<div class="fitem">--%>
			                <%--<label>新增时间:</label>--%>
			                <%--<input name="addedTime" class="easyui-textbox easyui-validatebox"   data-options="required:true">   --%>
	           			 <%--</div>--%>
						 <%--<div class="fitem">--%>
			                <%--<label>级别:</label>--%>
			                <%--<input name="level" class="easyui-textbox easyui-validatebox"   data-options="required:true">   --%>
	           			 <%--</div>--%>
      </form>
	</div> 
	
	

	<!-- 保存和关闭按钮 -->
	<div id="dlg-buttons">
		<a href="javascript:save()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
		<a href="javascript:closeDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>
	
</body>
</html>